<!DOCTYPE html>
<html>
	<head>
	<title id="title_id"></title>
	<meta charset="utf-8" />
	<meta http-equiv="Cache-Control" CONTENT="no-store, no-cache, must-revalidate">
	<meta http-equiv="Cache-Control" CONTENT="post-check=0, pre-check=0">
	<meta http-equiv="Pragma" CONTENT="no-cache">
	<style type="text/css">
		@import url("app/davinci/workbench.css?@revision@");
		html, body {
			width: 100%;
			height: 100%;
		}
	</style>
	<script type="text/javascript" src="app/dojo/dojo.js?@revision@" data-dojo-config="
		async: true,
		parseOnLoad: true,
		modulePaths:{'preview':'../preview', 'system':'../system'},
		aliases:[['i18n', 'dojo/i18n']],
		cacheBust: '@revision@',
		ioPublish:true
	"></script>
	<script type="text/javascript">
		require(["dijit/dijit", "davinci/davinci" ], function () {
			require(["dojo/i18n!davinci/nls/webContent", "davinci/version", "dojo/domReady!"], function (webContent, version) {
				  dojo.byId("load_screen").innerHTML = webContent.loadingMaqetta;
				  dojo.byId("title_id").text = webContent.pageDesignerTitle;
			});

			var Workbench = require("davinci/Workbench"),
				Runtime = require("davinci/Runtime")
		
			var resetWorkbenchState = dojo.queryToObject(dojo.doc.location.search.substr((dojo.doc.location.search[0] === "?" ? 1 : 0))).resetWorkbenchState;
			if(resetWorkbenchState){
				Workbench._state = {};
				Workbench.updateWorkbenchState().then(function(){
					location.href=".";	
				});
				
			}	
				
				
			Runtime.loadPlugins();
	 		Runtime.initialPerspective="davinci.ve.pageDesign";

			require(["dojo/i18n!davinci/nls/webContent", "dojo/domReady!"], function (webContent) {

				// Display a warning dialog for unsupported browsers
				if (!(dojo.isFF >= 4 || dojo.isChrome >= 5 || dojo.isSafari >= 5.1)) {
					var unsupportedDialog = new require("dijit/Dialog")({
						id: "unsupportedBrowserDialog",
						title: webContent.unsupportedBrowser,
						content: ["<p>"+ webContent.unsupportedNote +"</p>",
								"<div class='maqButtonArea'>",
								"   <button dojoType='dijit.form.Button' type='submit'>",
								webContent.buttonContinue,
								"   </button>",
								"</div>"
								].join(" "),
						execute: function() { run(); }
					});
					unsupportedDialog.show();
				} else {
					Workbench.run();
				}
			});

			dojo.addOnUnload(Workbench.unload);
		});
	</script>
	<link rel="shortcut icon" href="app/davinci/img/maqetta.png" />
	</head>

	<body id='maqBody' class="claro">
		<div class="loading"><table><tr><td id="load_screen"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;</td></tr></table></div>
		<div id="davinci_app">
			<div id="davinci_top_bar">
				<div id="davinci_top_bar_main">
					<div id="davinci_user_container">
						<span id="davinci_main_menu"> </span>
					</div>
					<span class="maq_banner_name_box">
						<span class="maq_banner_logo"></span>
						<span class="maq_banner_name">Maqetta</span>
					</span>
					<span id="maq_banner_editor_commands"></span>
				</div>
				<div id="davinci_top_bar_divider"></div>
			</div>
			<div id="mainBody"></div>
		</div>
		<div id="contentassist" class="contentassist"></div>
	</body>
</html>
